<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 * @version    $Id: Participate.php 2011-03-09 08:45:41Z idris $
 * @author     Idris
 */

/**
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 */

class Vote_Form_Music_Participate extends Vote_Form_Participate {
	public function init() {
		parent::init ();
		
		$subject = Engine_Api::_ ()->core ()->getSubject ();
		
		$this->setTitle ( 'vote_music_part_CREATE_TITLE' )->setDescription ( 'vote_music_part_CREATE_DESC' )->setMethod ( 'post' )->setAttrib ( 'id', 'form-upload-music' )->setAttrib ( 'class', 'global_form create_voting_form' )->setAction ( Zend_Controller_Front::getInstance ()->getRouter ()->assemble ( array ('controller' => 'music', 'action' => 'upload', 'challenge_id' => $subject->getIdentity () ), 'vote_general' ) );
		
		$this->getElement ( 'title' )->setLabel ( 'vote_music_part_Title' );
		$this->getElement ( 'description' )->setLabel ( 'vote_music_part_Description' );
		$this->getElement ( 'photo' )->setLabel ( 'vote_music_part_Artwork' );
		
		$this->addElement ( 'Hidden', 'id', array ('order' => 2 ) );
		
		$fancyUpload = new Engine_Form_Element_FancyUpload ( 'file' );
		$fancyUpload->clearDecorators ()->addDecorator ( 'FormFancyUpload' )->addDecorator ( 'viewScript', array ('viewScript' => '_FancyUploadMusic.tpl', 'placement' => '' ) );
		
		Engine_Form::addDefaultDecorators ( $fancyUpload );
		$this->addElement ( $fancyUpload );
		
		$this->addElement ( 'Hidden', 'fancyuploadfileids' );
	}
}